import React from 'react';
import { View, ScrollView } from 'react-native';
import { WingBlank } from '@ant-design/react-native';
import PropTypes from 'prop-types';
import Item from '../Item';
// import styles from './styles';

const List = ({ navigation, planList, getPlanList }) => (
    <View>
        <WingBlank>
            <ScrollView
                style={{ marginBottom: 10 }}
            >
                {
                    planList.map(objItem => (
                        <Item
                            key={objItem.planid}
                            navigation={navigation}
                            objItem={objItem}
                            getPlanList={getPlanList}
                        />
                    ))
                }
            </ScrollView>
        </WingBlank>
    </View>
);
List.defaultProps = {
    planList: [],
    getPlanList: () => {},
};
List.propTypes = {
    planList: PropTypes.arrayOf(PropTypes.any),
    getPlanList: PropTypes.func,
};
export default List;
